﻿@using MyCompanyName.AbpZeroTemplate.Authorization
@using MyCompanyName.AbpZeroTemplate.Web.Areas.AppAreaName.Startup
@model MyCompanyName.AbpZeroTemplate.Web.Areas.AppAreaName.Models.DynamicEntityPropertyValues.DynamicEntityPropertyValueManageAllViewModel
@{
    ViewBag.CurrentPageName = AppAreaNamePageNames.Common.DynamicEntityProperties;
}

@section Scripts
{
    <script abp-src="/view-resources/Areas/AppAreaName/Views/_Bundles/dynamic-entity-property-value-manage-all.js" asp-append-version="true"></script>
}

<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
    <abp-page-subheader title="@L("DynamicEntityPropertyValues")"></abp-page-subheader>

    <div class="@(await GetContainerClass()) d-flex flex-column-fluid">
        <div class="container">
            <div class="card card-custom gutter-b">
                <div class="card-header align-items-center border-0 mt-4">
                    <span class="text-dark">
                        <span class="font-weight-bold" style="font-size:1.1em">@L("EntityFullName"):&thinsp;</span> @Model.EntityFullName
                    </span>
                    <div class="card-toolbar">
                        <span class="font-weight-bold" style="font-size:1.1em">@L("EntityRowId"): &thinsp;</span> @Model.EntityId
                    </div>
                </div>

                <div class="card-body">
                    @Html.HiddenFor(x => x.EntityId)
                    @Html.HiddenFor(x => x.EntityFullName)
                    <div class="align-items-center">
                        <table id="DynamicEntityPropertyValuesTable" class="display table table-separate table-head-custom no-footer dtr-inline dt-responsive nowrap">
                            <thead>
                            <tr>
                                <th>@L("PropertyName")</th>
                                <th>@L("Values")</th>
                                @if (IsGranted(AppPermissions.Pages_Administration_DynamicEntityPropertyValue_Delete))
                                {
                                    <th style="width: 50px">@L("Actions")</th>
                                }
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="card-footer">
                    <button type="button" id="saveProperties" class="btn btn-success pull-right">@L("Save")</button>
                </div>
            </div>
        </div>
    </div>
</div>
